package cn.jiyun.controller;

import cn.jiyun.service.CouponInfoService;
import com.jiyun.Result.Result;
import com.mysql.cj.log.Log;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("carProduct/coupon")
@Slf4j
public class CouponInfoController {
    @Autowired
    private CouponInfoService couponService;

    @GetMapping("/findCoupon")
    public Result findAll(){
        return couponService.findCoupon();
    }

    @GetMapping("findCouponUserList")
    public Result findCouponUserList( String  price){
        log.info("价格："+price);
    	return couponService.findCouponUserList(price);
    }
}
